Micron Document
Fox's Git Mirrors


Displaying Raw • Download

pkg/securemem/wipe.go 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 270 B

// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-2026 Quad4.io

package securemem

import "runtime"

// WipeBytes overwrites b with zeros. Prefer for temporary key staging.
func WipeBytes(b []byte) {
for i := range b {
b[i] = 0
}
runtime.KeepAlive(b)
}

Served by rngit 1.5.2 - Generated in 0.02s